package cn.hk.delete.controller;

import cn.hk.delete.service.OrderDeleteService;
import cn.HK.vo.SystemResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class OrderDeleteController {
    @Autowired
    private OrderDeleteService orderService;
    @RequestMapping(value = "/order/deleteOrder",method = RequestMethod.GET)
    public SystemResult deleteOrder(Integer uId,String oId) {
        try {
            orderService.deleteOrder(uId,oId);
            return SystemResult.ok();
        } catch (Exception e) {
            e.printStackTrace();
            return SystemResult.build(201, "删除订单失败", null);
        }
    }
}
